<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组件注册 - 依赖</title>
    <script src="https://unpkg.com/vue@next"></script>
  </head>
  <body>
    <div id="Application">
        <p>推荐</p>
        <comp1></comp1>
    </div>
  </body>

  <script>
    const App= Vue.createApp({})

    const comp2 = {
      template:`<div>组件2</div>`
    }

    const comp1 = {
      components:{
        "comp2":comp2
      },
      template: `<div>组件1<comp2></comp2></div>`
    }

    App.component("comp1",comp1)
    App.mount("#Application")
  </script>

</html>